<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>无标题文档</title>
		<link href="<%=request.getContextPath()%>/css/bgcss.css"
			rel="stylesheet" type="text/css" />
			<script type="text/javascript">
		function check(){		
			var admin=document.adminform;
			if(admin.admin_login_name.value==""||admin.admin_login_name.value.length==0){
				alert("请填写管理员登陆帐号");
				admin.admin_login_name.focus();
				return false;
					
			}
			else if(admin.admin_login_name.value.length>21||admin.admin_login_name.value.length<5){
					alert("登陆帐号长度为6~20位");
					admin.admin_login_name.focus();
					return false;
				}
			else if(admin.admin_login_password.value==""||admin.admin_login_password.value.length==0){
				alert("请填写管理员登陆密码");
				admin.admin_login_password.focus();
				return false;
			}
			else if(admin.admin_login_password.value.length>21||admin.admin_login_password.value.length<5){
					alert("登陆密码长度为6~20位");
					admin.admin_login_password.focus();
					return false;
				}
			else if(admin.admin_login_password2.value==""||admin.admin_login_password2.value.length==0){
				alert("请填写管理员确认密码");
				admin.admin_login_password2.focus();
				return false;
			}
			else if(admin.admin_login_password2.value!=admin.admin_login_password.value){
				alert("两次输入的密码不一致");
				admin.admin_login_password2.focus();
				return false;
			}
			else if(admin.admin_nick_name.value==""||admin.admin_nick_name.value.length==0){
				alert("请填写管理员昵称");
				admin.admin_nick_name.focus();
				return false;
			}
			else if(admin.admin_nick_name.value.length>20){
					alert("昵称不可以超过20个长度");
					admin.admin_login_password.focus();
					return false;
				}
			
			else if(!confirm('确认修改管理员?')){    
      			 return false;   
 		 	 }
			else{
				return true;
			}			
		}
	</script>
	</head>

	<body>
		<jsp:include page="../frame/right_top.jsp" flush="true" />
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td>
								&nbsp;
							</td>
							<td style="padding-right: 10px;">
								<div align="right">
									<table border="0" align="right" cellpadding="0" cellspacing="0">
										<tr>
											<td width="60">
												<table width="87%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="60">
												<table width="90%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="60">
												<table width="90%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
											<td width="52">
												<table width="88%" border="0" cellpadding="0"
													cellspacing="0">
													<tr>
													</tr>
												</table>
											</td>
										</tr>
									</table>
								</div>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
				<form action="<%=request.getContextPath()%>/background/admin?action=update" name="adminform"
			method="post" onsubmit="return check();">
					<table width="60%" border="0" cellpadding="0" cellspacing="1"
						bgcolor="#c9c9c9">
						<tr>
							<td height="22" width="120" bgcolor="#FFFFFF">
								<div align="center">
								<input type="hidden" name="admin_id" value="${admin.admin_id }"/>
									<strong><span class="STYLE1">帐号</span> </strong>
								</div>
							</td>
							<td bgcolor="#FFFFFF">
								<input type="text" name="admin_login_name" size="40"
									maxlength="15" onkeyup="value=value.replace(/[\W]/g,'')" value="${admin.admin_login_name }"/>
							</td>
						</tr>
						<tr>
							<td height="22" width="120" bgcolor="#FFFFFF">
								<div align="center">
									<strong><span class="STYLE1">密码</span> </strong>
								</div>
							</td>
							<td bgcolor="#FFFFFF">
								<input type="password" name="admin_login_password" size="40"
									maxlength="15" onkeyup="value=value.replace(/[\W]/g,'')" value="${admin.admin_login_password }"/>
							</td>
						</tr>
						<tr>
							<td height="22" width="120" bgcolor="#FFFFFF">
								<div align="center">
									<strong><span class="STYLE1">重复密码</span> </strong>
								</div>
							</td>
							<td bgcolor="#FFFFFF">
								<input type="password" name="admin_login_password2" size="40"
									maxlength="15" onkeyup="value=value.replace(/[\W]/g,'')" value="${admin.admin_login_password }"/>
							</td>
						</tr>
							<tr>
							<td height="22" width="120" bgcolor="#FFFFFF">
								<div align="center">
									<strong><span class="STYLE1">昵称</span> </strong>
								</div>
							</td>
							<td bgcolor="#FFFFFF">
								<input type="text" name="admin_nick_name" size="40"
									maxlength="15" value="${admin.admin_nick_name }"/>
							</td>				
						</tr>	
						<tr>
						
							<td height="22" bgcolor="#FFFFFF" colspan="2">
							<div align="center">
							<input type="submit" value="确认" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							<input type="button" value="返回" onclick="javascript:history.go(-1);"/>
							</div>
							</td>
							
						</tr>					
					</table>
					</form>
				</td>
			</tr>
		</table>
	</body>
</html>
